home *** CD-ROM | disk | FTP | other *** search
- IEEE_EXPONENT(3I) Last changed: 1-6-98
-
-
- NNAAMMEE
- IIEEEEEE__EEXXPPOONNEENNTT - Returns the unbiased exponent of _x
-
- SSYYNNOOPPSSIISS
- IIEEEEEE__EEXXPPOONNEENNTT (([XX==]_x[,, [YY==]_y]))
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- UNICOS/mk and IRIX systems
-
- CRAY T90 systems that support IEEE floating-point arithmetic
-
- SSTTAANNDDAARRDDSS
- CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran 90
-
- IEEE Standard for Binary Floating-point Arithmetic
-
- DDEESSCCRRIIPPTTIIOONN
- The IIEEEEEE__EEXXPPOONNEENNTT intrinsic function returns the unbiased exponent of
- _x. This function corresponds to the llooggbb function described in the
- IEEE standard appendix of recommended functions.
-
- The IIEEEEEE__EEXXPPOONNEENNTT function accepts the following arguments:
-
- _x Must be of type real. Can be a scalar or array value.
-
- _y Can be of type integer or real. Must be a scalar value.
-
- IIEEEEEE__EEXXPPOONNEENNTT is an elemental function. The name of this intrinsic
- cannot be passed as an argument.
-
- RREESSUULLTT TTYYPPEE AANNDD TTYYPPEE PPAARRAAMMEETTEERR
- If _x is a scalar, the result is a scalar. If _x is an array, the
- result is an array of the same shape as _x.
-
- If _y is absent, the result is of type default integer.
-
- If _y is present and is of type integer, the result is of type integer
- and has the same kind type parameter value as _y.
-
- If _y is present and is of type real, the result is of type real and
- has the same kind type parameter value as _y.
-
- NNOOTTEESS
- The IEEE intrinsic procedures use the named constants contained in a
- system module, so you must include one of the following statements in
- your program:
-
- * On UNICOS and UNICOS/mk systems: UUSSEE CCRRII__IIEEEEEE__DDEEFFIINNIITTIIOONNSS
-
- * On UNICOS, UNICOS/mk, and IRIX systems: UUSSEE FFTTNN__IIEEEEEE__DDEEFFIINNIITTIIOONNSS
-
- The CCRRII__IIEEEEEE__DDEEFFIINNIITTIIOONNSS module is obsolescent. It will be removed
- for the CF90 4.0 release.
-
- RREETTUURRNN VVAALLUUEESS
- The result is the value of the unbiased exponent of _x.
-
- If _y is absent and _x is +_i_n_f, -_i_n_f, or NaN, the result is HHUUGGEE((00)). If
- _x is 0.0, the result is --HHUUGGEE((00)).
-
- If _y is present and of type integer and _x is +_i_n_f, -_i_n_f, or NaN, the
- result is HHUUGGEE((_y)). If _x is 0.0, the result is --HHUUGGEE((_y)).
-
- If _y is present and of type real, the value is an integral value in
- floating-point format. If _x is a NaN, the result is a NaN. If _x is
- +_i_n_f or -_i_n_f, the result is +_i_n_f. If _x is 0.0, the result is -_i_n_f and
- the division by zero exception is raised.
-
- When _x is positive and finite, the expression IIEEEEEE__BBIINNAARRYY__SSCCAALLEE((XX,,
- --IIEEEEEE__EEXXPPOONNEENNTT((XX)))) lies strictly between 0 and 2; it is less than 1
- only when _x is denormalized.
-
- EEXXAAMMPPLLEESS
- Example 1.
-
- REAL x
- ... ! Compute X.
- PRINT *, "Unbiased exponent of X:", IEEE_EXPONENT(x)
-
- The PPRRIINNTT statement prints the unbiased exponent of _x as a default
- integer value as long as _x is not one of the exceptional values noted
- in the RETURN VALUES section.
-
- Example 2. Program iieeeexxpp..ff9900 uses several intrinsic procedures:
-
- REAL(8) X
-
- PRINT *," TEST EXPONENT and IEEE_EXPONENT of HUGE"
- X = HUGE(1.0_8)
-
- ! HUGE scaled to 0.xxx
- PRINT *," F90 EXPONENT of x=",EXPONENT(x)
-
- ! HUGE scaled to x.xx
- PRINT *," Unbiased IEEE_EXPONENT of x=",IEEE_EXPONENT(x)
-
- PRINT *," TEST EXPONENT and IEEE_EXPONENT of TINY"
- X = TINY(1.0_8)
-
- ! TINY scaled to 0.xxx
- PRINT *," F90 EXPONENT of x=",EXPONENT(x)
-
- ! TINY scaled to x.xx
- PRINT *," Unbiased IEEE_EXPONENT of x=",IEEE_EXPONENT(x)
- END
-
- The output from this program is as follows:
-
- TEST EXPONENT and IEEE_EXPONENT of HUGE
- F90 EXPONENT of x= 1024
- Unbiased IEEE_EXPONENT of x= 1023
- TEST EXPONENT and IEEE_EXPONENT of TINY
- F90 EXPONENT of x= -1021
- Unbiased IEEE_EXPONENT of x= -1022
-
- SSEEEE AALLSSOO
- _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
- printed version of this man page.
-
-